'use strict';
var express = require('express');
var path = require('path');
var app = express();

app.use(express.logger('dev'))
.use(express.static(path.join(__dirname, 'public')))
.get('/', function(req, res) {
    res.render('main.ejs');
})
.use(function(req, res, next) {
	res.setHeader('Content-Type', 'text/plain');
    res.send(404, 'Oups, page introuvable !');
});

app.listen(8080);